import { defHttp } from '@/utils/http/axios';
import { AddGoodsRequest, GoodsSearchRequest } from '#/goods-manage/goods-manage/goods';

enum Api {
  AddGoods = '/goods-server/goods-manage/goods/add',
  goods = '/goods-server/goods-manage/goods',
}
export const addGoods = (params: AddGoodsRequest) =>
  defHttp.post({ url: Api.AddGoods, params: params }, { errorMessageMode: 'modal' });

export const goods = (params: GoodsSearchRequest) =>
  defHttp.post({ url: Api.goods, params: params }, { errorMessageMode: 'modal' });
